import fetch from 'common/src/utils/fetch'

/**
 * 修改/新增/编辑
 */
export function editDirDataByScheme(data) {
  return fetch({
    url: '/api/cultureservice/directionLableRel/editDirectionDataByScheme',
    method: 'POST',
    data
  })
}

/**
 * 查询方案下方向code和方案名称
 */
export function findDirBySchemeId(schemeId) {
  return fetch({
    url: '/api/cultureservice/directionLableRel/findDirectionByDirection?schemeId='+schemeId,
    method: 'GET'
  })
}

/**
 * 查询方案下各方向详细信息（可查询单个或所有方向）
 */
export function findDirectionLableRel(schemeId,directionCode) {
  return fetch({
    url: '/api/cultureservice/directionLableRel/findDirectionLableRel?schemeId='+schemeId+"&directionCode="+directionCode,
    method: 'GET'
  })
}

/**
 * 查询方案下各方向详细信息（所有方向）
 */
export function findAllDirection(schemeId) {
  return fetch({
    url: '/api/cultureservice/directionLableRel/findDirectionLableRel?schemeId='+schemeId,
    method: 'GET'
  })
}

/**
 * 删除
 */
export function delAllDirection(schemeId) {
  return fetch({
    url: '/api/cultureservice/directionLableRel/deleteDirectionDataByScheme?schemeId='+schemeId,
    method: 'DELETE'
  })
}



